var keyword = getParamsByUrl(location.href,'keyword');
var page = 1;
var html = '';
var priceSort = 1;
var num = 1;
var This =null;
var order={};

$(function(){
    mui.inti({
        pullRefresh:{
            container:'#refreshContainer',
            up:{
                height:50,
                auto:true,
                containerftesh:"正在加载...",
                callback:getData
            }
        }
    });
    $('#priceSort').on('tap',function(){
        
    })
})
function getData(){
    if(!This){
        This=this;
    }

    $.ajax({
        type:'get',
        url:'/product/queryProduct',
        data:{
            page:page++,
            pagesiez:3,
            proName:keyword,
            price:priceSort,
        },
        success:function(response){
            if(response.data.length>0){
                html += template('searchTpl',response);
                $('#search-box').html(html);
                This.endPullupToRefresh(false);
            }else{
                This.endPullupToRefresh(true);
            }
        }

    })
}
   
